function validateForm()
{
	
	var flag = true;
	var errorMessage = "";
	if($("[id='new_item_form:tran_ref_no']").val() == '')
	{
		errorMessage += "Transaction Code Field is empty!<br/>";
		$("[id='new_item_form:tran_ref_no']").addClass("error_class", 1000);
		flag = false;
	}
	if($("[id='new_item_form:item_name']").val() == '')
	{
		errorMessage += "Item name Field is empty!<br/>";
		$("[id='new_item_form:item_name']").addClass("error_class", 1000);
		flag = false;
	}
	if($("[id='new_item_form:item_description']").val() == '')
	{
		errorMessage += "Item Description Field is empty!<br/>";
		$("[id='new_item_form:item_description']").addClass("error_class", 1000);
		flag = false;
	}
	if($("[id='new_item_form:item_price']").val() == '')
	{
		errorMessage += "Price Field is empty!<br/>";
		$("[id='new_item_form:item_price']").addClass("error_class", 1000);
		flag = false;
	}
	if($("[id='new_item_form:item_location']").val() == '')
	{
		errorMessage += "Location Field is empty!<br/>";
		$("[id='new_item_form:item_location']").addClass("error_class", 1000);
		flag = false;
	}
	if($("[id='new_item_form:item_category']").val() == '')
	{
		errorMessage += "Category Field is empty!<br/>";
		$("[id='new_item_form:item_category']").addClass("error_class", 1000);
		flag = false;
	}
	if(flag == false)
	{
		$("#error_message").html(errorMessage);
		$("#error_message").show(1000);
	}
	return flag;
}

function loadIcon()
{
	var iconFile = $('[id="new_item_form:icon_file"]' ).val();
	$('[id="new_item_form:preview_icon"]' ).val(iconFile);
	return true;
}

function loadBtnOnClick()
{
	
	$('[id="new_item_form:load_icon_btn"]' ).click();
}

